<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="java.util.Iterator"%>
<%@page import="de.nava.informa.core.ItemIF"%>
<%@page import="java.util.Calendar"%>
<%@page import="de.nava.informa.parsers.FeedParser"%>
<%@page import="de.nava.informa.core.ChannelIF"%>
<%@page import="de.nava.informa.impl.basic.ChannelBuilder"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<!-- meta tags, link to css:  -->
	<%@ include file="./jsp-includes/metaheader.jsp" %>
	
	<!--  Ajax-Includes -->
    <script type='text/javascript' src='/GroupMe/dwr/interface/DWRUserManager.js'></script>
    <script type='text/javascript' src='/GroupMe/dwr/engine.js'></script>
    <script type='text/javascript' src='/GroupMe/dwr/util.js'></script>

	<title>GroupMe! - About/Background</title>
</head>
<body>
	<!-- title image, logo:  -->
	<div id="header">
		<%@ include file="./jsp-includes/titleheader.jsp" %>
	</div>
	
	<!-- Menu: -->
	<div id="menu">
		<%@ include file="./jsp-includes/menu.jsp" %>
	</div>
	
	<div id="main">

		<!-- Sidebar -->
		<div id="sidebar">
			<p><strong>Login:</strong></p>
			<%@ include file="./jsp-includes/login.jsp" %>
			<br/>
			<strong>Guest account:</strong> <br/>
			- <i>username:</i> guest <br/>
			- <i>password:</i> guest<br/><br/>
			<p>
			<strong>Quick start:</strong><br/>
			- video: <a href="http://groupme.org/videos/grouping/" title="Create your first GroupMe! group (47 MB)">[high]</a> <a href="http://groupme.org/videos/grouping-800x600/" title="Create your first GroupMe! group (31 MB)">[low]</a><br/>
			- register: <a href="<%= request.getContextPath() + "/" + VIEW_VOCABULARY.ACTION_REGISTRATION %>" title="Create a GroupMe! account">here</a><br/>
			- api: <a href="<%= request.getContextPath() + "/api/" %>" title="documentation">doc</a><br/>
			</p>
			
			<!-- NEWS -->
			<% final String blogUrl = "http://groupme.org/blog/?feed=rdf";
			ChannelIF channel = null;
			try{
				channel = FeedParser.parse(new ChannelBuilder(), blogUrl);
			}catch(Exception e){%>
				channel = null;
			<% } %>
			<% if(channel != null){%>
				<br/><strong>News:</strong><br/>
				<%  Iterator itemIterator = channel.getItems().iterator();
					int numberOfDisplayedNews = 1;
					while(itemIterator.hasNext() && numberOfDisplayedNews <= 3){
						ItemIF item = (ItemIF)itemIterator.next(); 
						//date:
						Calendar date = Calendar.getInstance();
						date.setTime(item.getDate());
						//description:
						String description = item.getDescription();
						if(description != null){
							//while(description.contains("<") && description.contains(">")){
							//	description = description.substring(0, description.indexOf("<")) +
							//		description.substring(description.indexOf(">") + 1);
							//} TODO: das sollte man wieder so machen, dass die description angezeigt wird, allerdings gab es einen Fehler mit 
							// dem folgenden Blogeintrag: http://groupme.org/blog/?p=9
							if(description.contains("<")){
								description = item.getTitle() + "...";
							}else{
								description = item.getDescription();
							}
						}
						if(description != null && description.length() > 150){
							description = description.substring(0, 150);
						}
						%>
						<div class="newsitem" style="margin-bottom: 1.0em">
						[<%= date.get(Calendar.YEAR) + "-" + (date.get(Calendar.MONTH) + 1) + "-" + date.get(Calendar.DATE) %>] <br/>
						<a href="<%= item.getLink() %>" title="<%= description %>"><%= item.getTitle() %></a>
						</div>
					<% numberOfDisplayedNews++;
					} %>
			<%} %>
		</div>


		<!-- Content: -->
		<div id="content">
			<h1>About</h1>
			<p>GroupMe! extends the idea of social tagging systems like <a href="http://del.icio.us">del.icio.us</a>, 
			<a href="http://www.flickr.com">Flickr</a> or <a href="http://www.bibsonomy.org/">BibSonomy</a> by introducing
			the group dimension. The foundation of social tagging systems are so-called <a href="http://vanderwal.net/folksonomy.html" title="Thomas Vander Wal: Folksonomy">folksonomies</a>, which 
			describe how users (folks) tag resources (e.g. photos, videos, publications, etc.). In technical terms a folksonomy is just a collection of tag assignments:</p> 
			<code>
			(User, Tag, Resource) = User has tagged Resource with Tag at a particular time. 
			</code>
			<p>Over time it is likely that semantics emerge, e.g. tags that are often assigned to same resources may be synonyms. Hence, folksonomies are 
			promising to improve (web) search, etc. With GroupMe!'s approach of taggable groups we extend tag assignments with
			a group dimension:</p>
			<code>
			(User, Tag, Group, Resource) = User has tagged Resource with Tag in a certain Group at a particular time.
			</code>
			<p><strong>Benefits of the GroupMe! approach:</strong></p> 
			<ul>
				<li>improved foundation for search and ranking strategies (e.g. handling of un-tagged resources, see red resource in foigure below)</li>
				<li>improved foundation to learn relations between tags (see figure below)</li>
				<li>improved foundation to bridge from folksonomies to ontologies (e.g. more precise relations between tags + RDF descriptions of resources)</li>
			</ul> 
			<p style="text-align: center;"><img src="<%= request.getContextPath() %>/images/traditional-vs-groupme.png" alt="traditional vs. GroupMe! tagging systems"/></p>
		</div>
	</div>
	
	</body>
	
	
	</html>